<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录-迅泊达</title>
    <link rel="shortcut icon" href="/static/favicon.ico"/>
    <link rel="stylesheet" href="/static/front/fonts/iconfont.css">
    <link rel="stylesheet" href="/static/front/css/base_new.css">
    <link rel="stylesheet" href="/static/front/css/library.css">
    <link rel="stylesheet" href="/static/front/css/style.css">
    <script src="/static/front/js/jquery-1.11.1.min.js"></script>
    <script src="/static/front/js/jquery.countdown.js"></script>
    <script src="/static/front/js/js.js"></script>
    <!--[if lt IE 9]>
    <script src="/static/front/js/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script type="text/javascript" src="plugIn/PIE.js"></script>
    <![endif]-->
</head>
<body>
<div class="content">
    <div id="top">
        <div  class="cnt">
            <p class="fl">
                <span>客服热线：400-880-7023</span>
                <a href="http://crm2.qq.com/page/portalpage/wpa.php?uin=4008807023&aty=0&a=0&curl=&ty=1" target="_blank;">在线客服</a>
            </p>
            <ul class=" listUl fr">
                <li><a href="/index" class="returnIndex">返回首页</a></li>
                <#if _user?exists>
	        		<li>您好，<a href="/account/info" class="orange">${_user.username}</a></li>
	        		<li><a href="/logout">退出</a></li>
	        	<#else>	
	            <li class=""><a href="/login" class="orange">请登录</a></li>
	            <li class=""><a href="/register">免费注册</a></li>
	            </#if>
                <li class="login">您好，<a href="#" class="orange">fsdfsds</a></li>
                <li class="login"><a href="javascript:;">退出</a></li>
                <!--<li><a href="#">交流社区</a></li>-->	
                <li><a href="/activityCenter">活动中心</a></li>
                <li class="last"><a href="/help">帮助中心</a></li>
            </ul>
        </div>
    </div>
    <div id="nav">
        <div class="cnt ">
            <div class="logo fl logoNoText clearfix"><a href="index.html" class="fl">迅泊达-信泊海内、诚达天下</a> <span class="fr" style="font-size:25px;">登  录</span></div>
        </div>
    </div>
    <div class="userMain clearfix" id="login">
       <div class="fr user">
           <h2 style="letter-spacing:4px;">登录迅泊达账号</h2>
           <form class="userFrom registerform"  method="post">
               <div class="loginFrom">
                   <div class="phone clearfix FU last">
                       <input class="fl name" id="username" type="text" placeholder="用户名 / 手机号 " style="font-size:15px;">
                   </div>
                   <div class="userName clearfix FU last">
                       <input type="password" id="password" class="fl password" placeholder="请输入密码" style="font-size:15px;">
                   </div>
               </div>
               <div class="FU clearfix last link">
                   <a href="/forget" class="fl forgetPassword">忘记密码？</a>
                   <a href="/register" class="fr register">免费注册</a>
               </div>
               <input type="button" id="login_btn" value="登 录" class="btn" style="font-size:21px;cursor:pointer;">
           </form>
       </div>
        <div class="pic fl">
            <img src="${_front_images}/AppIcon.gif" alt="">
        </div>
    </div>
    <div class="userFooter" style="margin-top:280px;"><em class="iconfont">&#xe602;</em>2013 XUNBODA | 武汉迅泊达金融服务有限公司 | 鄂ICP备13010359</div>
</div>
</body>
</html>
<script type="text/javascript" src="${_front_js}/layer/layer.js" ></script>
<script type="text/javascript">
	$("#login_btn").click(function(){
		login();
	})
	//回车键监听
	$(document).keydown(function(event){
		if(event.keyCode == 13){
			login();
		}
	});
	
	function login(){
		var username=$("#username").val();
		var password=$("#password").val();
		$("#login_btn").attr("disabled",true);
		$.ajax({
			type: 'POST',
            url:  '/login',
            data: {
				username:username,
				password:password  
            },
            async: false,
            success: function(result) {
            	if(result.code == -1){
            		window.location.href="/index";
            	}else{
					//$("#code").attr("value","");
            		//$("#imgCode").click();
					layer.alert(result.msg);
					$("#login_btn").attr("disabled",false);
            	}
            }
        });
	}
	
	var msg=$("#msg").val();
	if(msg!="" && msg!=null){
		layer.alert(msg);
	}
</script>
</body>
</html>